<div class='fui-page fui-page-current' ng-if="pagedata.op=='get'">
    <div class="fui-header">
		<div class="fui-header-left" onclick="window.history.go(-1);">
            <a class="back"></a>
        </div>
		<div class="title">我的销客</div>
		<div class="fui-header-right"></div>
	</div>
	<div class='fui-content member-page'>
		<div class="headinfo" style="background:{{pagedata.item.top_bgcolor?pagedata.item.top_bgcolor:'red'}}">
			<a class="setbtn" href="javascript:;" ng-click="access_json('core/member.set/')"><i class="fa fa-cog"></i></a>
			<div class="child">
				<div class="title">佣金</div>
				<div class="num">{{pagedata.item.credit2 || '0.00'}}</div>
				<a href="javascript:;"><div class="btn">提现</div></a>
			</div>
			<div class="child userinfo">
				<a href="javascript:;" style="color: white;">
					<div class="face"><img ng-src="{{tomedia(pagedata.item.userinfo.avatar) || '../core/resource/images/gw-user.png'}}" /></div>
					<div class="name">{{pagedata.item.userinfo.nickname || '无昵称'}}</div>
				</a>
				<div class="level"  ng-show="pagedata.group_show">
				    {{pagedata.item.group || '微客'}}
				  
				</div>
				<div class="level"  ng-show="!pagedata.group_show" >
				    {{pagedata.item.group || '微客'}}
				    <i class='fa fa-question1' style='font-size:0.65rem'></i>
				</div>
			</div>
			<div class="child">
				<div class="title">积分</div>
				<div class="num">{{pagedata.item.credit1 || '0'}}</div>
				<a href="javascript:;" onclick="$('#show_vipcard').modal();" class="external"><div class="btn">会员卡</div></a>
			</div>
			<div class="water">
				<div class="water-1"></div>
				<div class="water-2"></div>
			</div>
		</div>
		<div class="fui-cell-group">
			<div class="fui-cell"style="height: 2.85rem;">
				<div class="fui-cell-icon">
					<i class="icon jinyunicon icon-qrcode"></i>
				</div>
				<div class="fui-cell-text">我的邀请码：{{pagedata.item.incode}}
				</div>
			</div>
		</div>
		<div class="fui-cell-group fui-cell-click ">
			<a class="fui-cell" href="javascript:;" ng-click="access_json('core/account.myorder/')">
					<div class="fui-cell-icon"><i class="icon icon-xiaochengxuma"></i></div>
					<div class="fui-cell-text"><p>我的服务订单</p></div>
					<div class="fui-cell-remark"><span class='badge'></span></div>
			</a>
			<a class="fui-cell"  href="javascript:;" ng-click="access_json('core/home.agent_home/list/')">
					<div class="fui-cell-icon"><i class="icon icon-wo1"></i></div>
					<div class="fui-cell-text"><p>我的下级团队</p></div>
					<div class="fui-cell-remark"></div>
			</a>
			<a class="fui-cell" href="javascript:;" ng-click="access_json('core/home.agent_home/clearlog/')">
					<div class="fui-cell-icon"><i class="icon icon-icon"></i></div>
					<div class="fui-cell-text"><p>我的结算</p></div>
					<div class="fui-cell-remark"><span class='badge'></span></div>
			</a>
			<a class="fui-cell" href="javascript:;" onclick="$('#show_kfewm_modal').modal()">
					<div class="fui-cell-icon"><i class="icon icon-xiaochengxuma"></i></div>
					<div class="fui-cell-text"><p>我的二维码</p></div>
					<div class="fui-cell-remark"><span class='badge'></span></div>
			</a>
		</div>
		<div class="footer-support">
			<div ng-if="main.js_supportimg" class="supportimg"><img ng-src="{{tomedia(main.js_supportimg) || '../core/resource/images/js_supportimg.png'}}"/></div>
			<div class="supporttitle">{{main.js_support}}提供技术支持</div>
		</div>
	</div>
</div>
<div id="show_vipcard"  class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
		<div class="modal-dialog" style="top:30%;">
			<div class="memlogo-area" style="background:url({{tomedia(pagedata.item.cardbg) || '../core/resource/images/cardbg.png'}}) no-repeat 100%">
                    <div class="memlogo">
                        <img ng-src="{{tomedia(pagedata.item.avatar) || '../core/resource/images/gw-user.png'}}">
                    </div>
                    <div class="name">{{pagedata.item.name || '匿名'}}</div>
                    <br>
                    <div class="name">{{pagedata.item.userinfo.mobile || '无手机号'}}</div>
                    <div ng-if="main.icon" class="code">
                        <img ng-src="{{tomedia(main.icon)}}">
                    </div>
                    <div class="bot">
						<img id="barcode"/>
                        <span class="r-f">{{pagedata.item.group || '微客'}}</span>
                    </div>
            </div>
		</div>
</div>
<div id="show_kfewm_modal" class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
<div class="modal-dialog" style="width:80%;left:10%;top:20%">
	<div class="modal-content" style="padding:0.5rem">
		<div class="title c">请长按,扫描下面的二维码</div>
		<div class="row margin0">
			<div class="image jy-2">
				<img style="width:100%" ng-src="{{tomedia(pagedata.h5ewm) || '../core/resource/images/nopic.jpg'}}"></img>
			</div>
			<div class="image jy-2" style="margin-top:0.2rem">
				<img style="width:100%" ng-src="{{tomedia(pagedata.wxappewm) || '../core/resource/images/no-wxapp.png'}}"></img>
			</div>
		</div>
	</div>
</div>
</div>
<div class='fui-page fui-page-current' ng-if="pagedata.op=='list'">
<div class="fui-header">
        <div class="fui-header-left">
            <a class="back"></a>
        </div>
        <div class="title">我的团队({{pagedata.agent_num || 0}}个)</div>
    </div>
    <div class="fui-content navbar">
        
        <div class="fui-tab fui-tab-warning" id="tab">
            <a ng-repeat="(level,num) in pagedata.levels" ng-click="pagedata.list=[];pagedata.loaded=false;pagedata.params.page=1;pagedata.params.level=level;pagedata.get_list()" ng-class="{'active':pagedata.params.level==level}" href="javascript:;">{{level}}级({{num}})</a>
        </div>
        <div  class="fui-list-group" id="container" >
		<div ng-repeat="item in pagedata.list track by item.mid" class="fui-list" style="height: 3.5rem">
			<div class="fui-list-media">
				<img ng-if="item.member.avatar" ng-src="{{tomedia(item.member.avatar)}}" class="round" style="width:2rem;height:2rem">
				<i ng-if="!item.member.avatar" class="icon icon-my2"></i>
			</div>
			<div class="fui-list-inner">
				<div class="row">
				      <div class="row-text" >
					 
					  <i ng-if="item.is_agent" class="icon icon-star text-danger"></i>
					 {{item.member.nickname}}
				      </div>
				</div>
				<div ng-if="item.is_agent" class="subtitle">
				    成为{{pagedata.setting.tagent || '分销商'}}时间: {{date(item.agenttime)}}
				    
				    
				</div>
				<div ng-if="!item.is_agent" class="subtitle">
				    注册时间:{{date(item.createtime)}}
				</div>
			</div>
			<div ng-if="item.is_agent" class="row-remark">
				<p>{{item.member_num}}个成员</p>

			</div>
			<div ng-if="!item.is_agent" class="row-remark">
				
				<p>消费: {{item.moneycount}}元</p>
				<p>{{item.ordercount}}个订单</p>

			</div>
		</div>
		</div>
		<div class='infinite-loading' style="display:none" id="loading_show"><span class='fui-preloader'></span><span class='text'> 正在加载...</span></div>
		<div ng-if="pagedata.list.length==0" class='content-empty' >
			<!--<i class='icon icon-group'></i><br/>暂时没有任何数据-->
			<img src="../core/resource/images/nomeb.png" style="width: 6rem;margin-bottom: .5rem;"><br/><p style="color: #999;font-size: .75rem">暂时没有任何数据</p>
		</div>

    </div>
</div>
<div class='fui-page fui-page-current' ng-if="pagedata.op=='clearlog'">
 <div class="fui-header">
        <div class="fui-header-left">
            <a class="back"></a>
        </div>
        <div class="title">我的结算({{pagedata.balance_total || 0}})</div>
    </div>
    <div class="fui-content navbar">

 <div class="fui-tab fui-tab-warning" id="tab">
            <a href="javascript:;" ng-class="{'active':pagedata.params.ispay==0}" ng-click="tool.get_list('core/home.agent_home/clearlog/ispay=0',true);pagedata.params.ispay=0;">待审核</a>
            <a href="javascript:;" ng-class="{'active':pagedata.params.ispay==1}" ng-click="tool.get_list('core/home.agent_home/clearlog/ispay=1',true);pagedata.params.ispay=1;">待打款</a>
            <a href="javascript:;" ng-class="{'active':pagedata.params.ispay==2}" ng-click="tool.get_list('core/home.agent_home/clearlog/ispay=2',true);pagedata.params.ispay=2;">已打款</a>
            <a href="javascript:;" ng-class="{'active':pagedata.params.ispay==3}" ng-click="tool.get_list('core/home.agent_home/clearlog/ispay=3',true);pagedata.params.ispay=3;">无效</a>
 </div>
        <div  class="fui-list-group" id="container" ng-init="pagedata.get_list()">
		<div ng-repeat="item in pagedata.list track by item.id" class="fui-list" style="height: 3.5rem">
			
			<div class="fui-list-inner">
				<div class="row">
				      <div class="row-text" >
					 
					 结算单号: {{item.balancesn}}
					 
				      </div>
				</div>
				<div  class="subtitle">
				    结算佣金：{{item.money}}
				    
				    
				</div>
				<div  class="subtitle">
				    手续费：{{item.balance_pay}}
				    
				    
				</div>
				<div  class="subtitle">
				    打款时间：{{item.pay_time}}
				    
				    
				</div>

			</div>
			<div  class="row-remark">
				<p>实际打款:{{item.final_money}}元</p>
				<p>打款方式：{{item.pay_type}}</p>
			</div>
			
		</div>
		</div>
		<div class='infinite-loading' style="display:none" id="loading_show"><span class='fui-preloader'></span><span class='text'> 正在加载...</span></div>
		<div ng-if="pagedata.list.length==0" class='content-empty' >
			<!--<i class='icon icon-group'></i><br/>暂时没有任何数据-->
			<img src="../core/resource/images/nomeb.png" style="width: 6rem;margin-bottom: .5rem;"><br/><p style="color: #999;font-size: .75rem">暂时没有任何数据</p>
		</div>
    </div>
</div>
<script>
if(scope.pagedata.op=='list'){
	scope.tool.get_list('core/home.agent_home/list/',true);
	scope.pagedata.scroll_bottom=function(){
		scope.tool.get_list('core/home.agent_home/list/');
	}
}
if(scope.pagedata.op=='clearlog'){
	scope.tool.get_list('core/home.agent_home/clearlog/ispay=0',true);
	scope.pagedata.scroll_bottom=function(){
		scope.tool.get_list('core/home.agent_home/clearlog/ispay='+scope.pagedata.params.ispay);
	}
}
</script>